package com.demo.service;

import com.demo.common.model.Aircraft;
import com.demo.common.model.User;
import com.demo.dao.AircraftDao;
import com.jfinal.aop.Inject;
import com.jfinal.kit.Kv;
import com.jfinal.plugin.activerecord.Page;
import com.jfinal.plugin.activerecord.SqlPara;

public class AircraftService {

    @Inject
    AircraftDao aircraftDao;

    public Page<Aircraft> paginate(int pageNumber, int pageSize) {
        return aircraftDao.paginate(pageNumber, pageSize);
    }

    public Page<Aircraft> paginate(int pageNumber, int pageSize, Kv cond) {
        return aircraftDao.paginate(pageNumber, pageSize, cond);
    }

    public Aircraft findById(int id) {
        return aircraftDao.findById(id);
    }

    public Aircraft findByAirNo(String id,String airNo){
        return aircraftDao.findByAirNo(id,airNo);
    }


    public void deleteById(int id) {
        aircraftDao.deleteById(id);
    }
}
